<?php
session_start();
?>
<?PHP
require_once("./include/membersite_config.php");

if(isset($_POST['submitted']))
{
   if($fgmembersite->AddGroup())
   {
        print "Add new group successfully"."<BR>";
   }
}
?>

<!DOCTYPE HTML>
<html>
  <head>
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" media="screen"
     href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css">
  </head>
  <body>
	<!-- Form Code Start -->
	<div id='fg_membersite'>
	<form id='add_group' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
	<fieldset >
	<legend>Add new lineup group</legend>

	<input type='hidden' name='submitted' id='submitted' value='1'/>

	<div class='short_explanation'>* required fields</div>
	<input type='text'  class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>' />

	<div><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span></div>
	<div class='container'>
		<label for='group_name' >Name*: </label><br/>
		<input type='text' name='group_name' id='group_name' value='<?php echo $fgmembersite->SafeDisplay('group_name') ?>' maxlength="32" /><br/>
		<span id='add_group_name_errorloc' class='error'></span>
	</div>
	<div class='container'>
		<label for='purpose' >Purpose*: </label><br/>
		<input type='text' name='purpose' id='purpose' value='<?php echo $fgmembersite->SafeDisplay('purpose') ?>' maxlength="256" /><br/>
		<span id='add_group_name_errorloc' class='error'></span>
	</div>
	<div class='container'>
		<label for='place' >Place*:</label><br/>
		<input type='text' name='place' id='place' value='<?php echo $fgmembersite->SafeDisplay('place') ?>' maxlength="128" /><br/>
		<span id='add_group_name_errorloc' class='error'></span>
	</div>
	<div class='container'>
		<label for='email' >Email*:</label><br/>
		<input type='text' name='email' id='email' value='<?php echo $fgmembersite->SafeDisplay('email') ?>' maxlength="64" /><br/>
		<span id='add_group_name_errorloc' class='error'></span>
	</div>
	<div class='container'>
		<label for='phone' >Phone number*:</label><br/>
		<input type='text' name='phone' id='phone' value='<?php echo $fgmembersite->SafeDisplay('phone') ?>' maxlength="16" /><br/>
		<span id='add_group_name_errorloc' class='error'></span>
	</div>
  
    <div id="datetimepicker1" class="input-append date">
      <label for='start_time' >Start datetime*:</label><br/>
      <input type="text" name='start_time' id='start_time' value='<?php echo $fgmembersite->SafeDisplay('start_time') ?>' maxlength="32"></input>
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
    <div id="datetimepicker2" class="input-append date">
      <label for='end_time' >End datetime*:</label><br/>
      <input type="text" name='end_time' id='end_time' value='<?php echo $fgmembersite->SafeDisplay('end_time') ?>' maxlength="32"></input>
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
	
	<div class='container'>
		<input type='submit' name='Submit' value='Submit' />
	</div>
	
    <script type="text/javascript"
     src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script> 
    <script type="text/javascript"
     src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
    </script>
    <script type="text/javascript"
     src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min.js">
    </script>

    <script type="text/javascript">
      $('#datetimepicker1').datetimepicker({
        format: 'yyyy:MM:dd hh:mm:ss'
      });
    </script>
    <script type="text/javascript">
      $('#datetimepicker2').datetimepicker({
        format: 'yyyy:MM:dd hh:mm:ss'
      });
    </script>	
  </body>
<html>